window.onload = function() {
	var ip = document.getElementById("ip");
	var hover = document.getElementsByClassName("hover")[0];
	var hqbd = document.getElementsByClassName("hqbd")[0]; //form
	var down = document.getElementById("down"); //关闭
	var sub = document.getElementById("sub"); //提交

	ip.onclick = function() {
		hover.style.display = "block";
	}
	down.onclick = function() {
		hover.style.display = "none";
	}
	sub.onclick = function() {
		var serial = document.getElementById("serial").value; //序号
		var name = document.getElementById("name").value; //名字
		var gender = document.getElementById("gender").value; //性别
		var age = document.getElementById("age").value; //年龄
		var hobbies = document.getElementById("hobbies").value; //爱好
		row = document.getElementById("table").insertRow();
		if(row != null) {
			cell = row.insertCell();
			cell.innerHTML = serial;
			cell = row.insertCell();
			cell.innerHTML = name;
			cell = row.insertCell();
			cell.innerHTML = gender;
			cell = row.insertCell();
			cell.innerHTML = age;
			cell = row.insertCell();
			cell.innerHTML = hobbies;
		}
	}

}